<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:m="http://www.ol4jsf.org"
	xmlns:o="http://openfaces.org/">

	<style type="text/css">
		.olControlSLDSelectPointActive {
			cursor: pointer;
		}
		.olControlPanel {
			float: right;
			right: 0px;
			height: 30px;
		}
		.olControlPanel div {
			float: right;
			display:block;
			width:  24px;
			height: 24px;
			margin: 5px;
			background-color:red;
		}
	
		.olControlPanel .olControlNavigationItemActive {
			background-color: blue;
			background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/pan_on.png");
		}
		.olControlPanel .olControlNavigationItemInactive {
			background-color: orange;
			background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/pan_off.png");
		}
	          .olControlPanel .olControlDrawFeatureItemActive {
	              width:  22px;
	              height: 22px;
	              background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/draw_line_on.png");
	          }
		.olControlPanel .olControlDrawFeatureItemInactive {
			width:  22px;
			height: 22px;
			background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/draw_line_off.png");
		}
		.olControlPanel .olControlZoomBoxItemInactive {
			width:  22px;
			height: 22px;
			background-color: orange;
			background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/drag-rectangle-off.png");
		}
	          .olControlPanel .olControlZoomBoxItemActive {
			width:  22px;
			height: 22px;
			background-color: blue;
			background-image: url("#{generalHelper.openLayersThemeDefaultImgPath}/drag-rectangle-on.png");
	          }
	          .olControlPanel .olControlZoomToMaxExtentItemInactive {
			width:  18px;
			height: 18px;
			background-image: url("#{generalHelper.openLayersImgPath}/zoom-world-mini.png");
	          }
		.alignTop {
			vertical-align:top;
		}
		.rich-filter-input {
			width: 50px;
		}
		.rich-spinner-input {
			width: 30px;
		}
	</style>
	
	<div align="center">
		<table width="95%" border="0" cellspacing="10px">
			<tr align="center" valign="top">
				<td width="50%">
					<strong>#{messages['dataentry.editdata.cadastral_section']}</strong>
					<rich:separator lineType="solid"/>
					<br style=""/>
					<h:panelGrid id="editDataTab1" columns="2" columnClasses=",rowtitle">
						<h:outputText value="#{messages['dataentry.editdata.parcel_name']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.zoneName) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.geometry_area']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.geometryArea) }"/>
					
						<h:outputText value="#{messages['dataentry.editdata.documented_area']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.documentedArea) }"/>
					
						<h:outputText value="#{messages['dataentry.editdata.measured_area']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.measuredArea) }"/>
					
						<h:outputText value="#{messages['dataentry.editdata.documented_built_area']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.documentedBuiltArea) }"/>
					
						<h:outputText value="#{messages['dataentry.editdata.ground_built_area']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.groundBuiltArea) }"/>
					
						<h:outputText value="#{messages['dataentry.editdata.neighborhood']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.neighborhood) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.access_way1']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.accessWay1) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.access_way2']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.accessWay2) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.house_number']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.houseNumber) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.location_in_country']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.locationInCountry) }"/>
					</h:panelGrid>
				</td>
				<td>
					<strong>#{messages['dataentry.editdata.tax_section']}</strong>
					<rich:separator lineType="solid"/>
					<br />
					<h:panelGrid id="editDataTab2" columns="2" columnClasses=",rowtitle">
						<h:outputText value="#{messages['dataentry.editdata.commercial_appraisal']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.commercialAppraisal) }" />
			
						<h:outputText value="#{messages['dataentry.editdata.fiscal_appraisal']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.fiscalAppraisal) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.payed_taxes']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(parcel.payedTaxes) }"/>
			
						<h:outputText value="#{messages['dataentry.editdata.status']}" />
						<h:outputText value="#{ viewParcelHelper.formatEmptyText(resBundle.loadMessage(parcel.status)) }" />
					</h:panelGrid>
				</td>
			</tr>
		</table>
		
		<h:panelGroup>
			<br />
			<br />
			<strong>#{messages['dataentry.editdata.cadastral_section2']}</strong>
			<rich:separator lineType="solid"/>
			<br />
			<table style="width: 100%">
				<tr>
					<th style="width: 33%">
						#{messages['txt.available_services']}
						<rich:separator lineType="solid"/>
					</th>
					<th style="width: 33%">
						#{messages['txt.easement']}
						<rich:separator lineType="solid"/>
					</th>
					<th style="width: 34%">
						#{messages['txt.improvement']}
						<rich:separator lineType="solid"/>
					</th>
				</tr>
				<tr valign="top">
					<td>
						<div align="center">
						<h:panelGrid columns="2" style="width:100%">
							<h:outputText value="#{messages['txt.available_services.streets']}" />
							<h:outputText value="#{ parcel.availableServices.streets != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.streets) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.water']}" />
							<h:outputText value="#{ parcel.availableServices.water != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.water) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.sidewalks']}" />
							<h:outputText value="#{ parcel.availableServices.sidewalks != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.sidewalks) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.drainage']}" />
							<h:outputText value="#{ parcel.availableServices.drainage != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.drainage) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.access']}" />
							<h:outputText value="#{ parcel.availableServices.access != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.access) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.topography']}" />
							<h:outputText value="#{ parcel.availableServices.topography != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.topography) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.location']}" />
							<h:outputText value="#{ parcel.availableServices.location != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.location) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.electricity']}" />
							<h:outputText value="#{ parcel.availableServices.electricity != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.electricity) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.lighting']}" />
							<h:outputText value="#{ parcel.availableServices.lighting != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.lighting) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.phone']}" />
							<h:outputText value="#{ parcel.availableServices.phone != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.phone) : messages['txt.no_value'] }" />
							
							<h:outputText value="#{messages['txt.available_services.tvcable']}" />
							<h:outputText value="#{ parcel.availableServices.tvcable != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.tvcable) : messages['txt.no_value'] }" />

							<h:outputText value="#{messages['txt.available_services.garbage_truck']}" />
							<h:outputText value="#{ parcel.availableServices.garbageTruck != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.garbageTruck) : messages['txt.no_value'] }" />

							<h:outputText value="#{messages['txt.available_services.heritage']}" />
							<h:outputText value="#{ parcel.availableServices.heritage != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.heritage) : messages['txt.no_value'] }" />

							<h:outputText value="#{messages['txt.available_services.landscape_value']}" />
							<h:outputText value="#{ parcel.availableServices.landscapeValue != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.landscapeValue) : messages['txt.no_value'] }" />

							<h:outputText value="#{messages['txt.available_services.vulnerable']}" />
							<h:outputText value="#{ parcel.availableServices.vulnerable != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.vulnerable) : messages['txt.no_value'] }" />

							<h:outputText value="#{messages['txt.available_services.business_class']}"/>
							<h:outputText value="#{ parcel.availableServices.businessClass != null ? viewParcelHelper.formatBooleanText(parcel.availableServices.businessClass) : messages['txt.no_value'] }" />
						</h:panelGrid>
						</div>
					</td>
					<td>
						<div align="center">
						<h:panelGroup rendered="#{empty parcel.easements}">
							<h:outputText value="#{messages['txt.easement.no_easements']}" />
						</h:panelGroup>
						<rich:dataTable value="#{parcel.easements}" var="easement" rendered="#{not empty parcel.easements}">
							<rich:column>
								<f:facet name="header">
									<h:outputText value="#{messages['txt.easement.type']}" />
								</f:facet>
								<h:outputText value="#{messages[easement.type.name()]}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="#{messages['txt.easement.document_type']}" />
								</f:facet>
								<h:outputText value="#{messages[easement.documentType.name()]}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">
									<h:outputText value="#{messages['txt.easement.beneficiary_number']}" />
								</f:facet>
								<h:outputText value="#{easement.beneficiaryNumber}" />
							</rich:column>
						</rich:dataTable>
						</div>
					</td>
					<td>
						<div align="center">
						<h:panelGroup rendered="#{empty parcel.improvements}">
							<h:outputText value="#{messages['txt.improvement.no_improvements']}" />
						</h:panelGroup>
						<rich:dataTable value="#{parcel.improvements}" var="improvement" rendered="#{not empty parcel.improvements}">
							<rich:column>
								<f:facet name="header">#{messages['txt.improvement.use']}</f:facet>
								<h:outputText value="#{improvement.use}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">#{messages['txt.improvement.easement_class']}</f:facet>
								<h:outputText value="#{improvement.easementClass}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">#{messages['txt.improvement.percentage_good']}</f:facet>
								<h:outputText value="#{improvement.percentageGood}" />
							</rich:column>
							<rich:column>
								<f:facet name="header">#{messages['txt.improvement.year_built']}</f:facet>
								<h:outputText value="#{improvement.yearBuilt}" />
							</rich:column>
						</rich:dataTable>
						</div>
					</td>
				</tr>
			</table>
		</h:panelGroup>
	</div>
</ui:composition>
